﻿using System;
using System.Runtime.Serialization;

namespace Skynet.CommonLibrary.WCF
{
    [DataContract]
    public class ParamesEntity
    {
        [DataMember]
        public string ClassName { get; set; }

        [DataMember]
        public string MethodName { get; set; }

        [DataMember]
        public string UserName { get; set; }

        [DataMember]
        public object[] Values { get; set; }

        public void Verity()
        {
            if (string.IsNullOrEmpty(this.ClassName))
                throw new Exception("表名称不能为空");
            if (string.IsNullOrEmpty(this.MethodName))
                throw new Exception("方法名称不能为空");
        }
    }
}
